// FrogImageResizeDialog.h : Declaration of the CFrogImageResizeFastDialog

#pragma once

#include "resource.h"       // main symbols
#include <atlhost.h>
#include "FrogProgressReportDialog.h"


// CFrogImageResizeFastDialog

class CFrogImageResizeFastDialog: public CFrogProgressReportDialog<CFrogImageResizeFastDialog>,
	public CWinDataExchange<CFrogImageResizeFastDialog>
{
public:

	enum { IDD = IDD_DIALOG_RESIZE_IMAGE };

	CFrogImageResizeFastDialog(HICON hIcon);	

	BEGIN_MSG_MAP(CFrogImageResizeFastDialog)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOk)
		COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
		COMMAND_HANDLER(IDC_CHECK_PUT_IN_FOLDER, BN_CLICKED, OnCheckPutInFolderBnClicked)
		// FrogBaseDialog Inherited
		CHAIN_MSG_MAP(CFrogProgressReportDialog)
	END_MSG_MAP()

	BEGIN_DDX_MAP(CFrogImageResizeFastDialog)
		DDX_TEXT(IDC_EDIT_FOLDER, m_Folder)	
		DDX_CHECK(IDC_CHECK_PUT_IN_FOLDER, m_PutInFolder)
	END_DDX_MAP()

	// Handler prototypes:
	//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	virtual void ExecuteCommand();

	double m_ShrinkBy;
	bool m_SaveJPG;

private:
	CString m_Folder;
	bool m_PutInFolder;
	
	CEdit m_EditFolder;	
	CButton m_CheckBoxPutInFolder;

	LRESULT OnClickedOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnClickedCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnCheckPutInFolderBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);	
};


